void income (double cash)
{   
	a+=cash;
	
}
void expend(double cash)
{
	a-=cash;
}
#include<stdio.h> 

double a;                   
int main(void) 
{ 
    int b;
    double cash;
    int a;
    cash = 0;                        
    scanf("%d", &b);            
    while (b != 0)
	{             
        if (b == 1 || b == 2)
		 {
            scanf("%lf", &cash);     
            if (b == 1)
			{
                income(cash);        
            }
			else
			{
                expend(cash);        
            }
            printf("a:%.2f\n", a);
        }
        scanf("%d", &b);         
     }

     return 0;
}

